package com.weishu.auth.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.weishu.system.api.domain.SysUser;
import com.weishu.auth.mapper.SysUserMapper;
import com.weishu.auth.service.ISysUserService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 系统用户 服务实现类
 * </p>
 *
 * @author 史珺玚
 * @since 2021-11-10
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {

    private final SysUserMapper userMapper;

    public SysUserServiceImpl(SysUserMapper userMapper) {
        this.userMapper = userMapper;
    }


    @Override
    public boolean saveOne(SysUser sysUser) {
        return userMapper.saveOne(sysUser);
    }

    @Override
    public SysUser tologin(String username, String pwd) {
        return userMapper.tologin(username,pwd);
    }
}
